<template>
	<view>
		<view class="goods" @click="toGoods" v-if="goods.id">
			<image class="image" :src="goods.image"></image>
			<view class="content">
				<text class="title">{{goods.title}}</text>
				<text class="price">{{goods.price}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import storage from '../../utils/storage'
	export default {
		data() {
			return {
				goods: {}
			}
		},
		mounted() {
			this.goods = storage.getLiveRoomInfo().goods || {}
			console.log('-=-=-=-=goods',this.goods)
		},
		methods: {
			toGoods() {
				uni.navigateTo({
					url: '/wNew/pages/detail?id=' + this.goods.id
				})
			}
		}
	}
</script>

<style scoped>
	.goods {
		background-color: rgba(255, 255, 255, .5);
		border-radius: 10rpx;
		padding: 20rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.image {
		width: 180rpx;
		height: 180rpx;
	}

	.content {
		flex: 1;
		margin-left: 20rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-around;
	}

	.price {
		margin-top: 20rpx;
	}

	.title,
	.price {

		font-size: 30rpx;
	}
</style>